
<ion-list class="{{::motion.ionListClass}}"
          ng-if="!search.loading && search.results">

  <div class="item item-avatar item-icon-right item-border-large ink"
       ng-repeat="item in search.results"
       ui-sref="app.view_page({id: item.id, title: item.urlTitle})">

    <i ng-if="::!item.avatar" class="item-image icon cion-page-{{::item.type}}"></i>
    <i ng-if="::item.avatar" class="item-image avatar" style="background-image: url({{::item.avatar.src}})"></i>

    <h2 ng-bind-html="::item.title"></h2>
    <h4>
      <span class="dark" ng-if="::item.city">
        <b class="ion-location"></b>
        <span ng-bind-html="::item.city"></span>
      </span>
      <span class="gray" ng-if="::item.distance">
        ({{::item.distance|formatDecimal}} {{::geoUnit}})
      </span>
    </h4>
    <h4 class="gray" ng-if="::item.time && search.lastRecords">
      <i class="ion-clock" ></i>
      {{::item.time | formatFromNow}}
    </h4>
    <h4 class="gray" ng-if="!search.lastRecords">
      <i class="cion-page-{{::item.type}}"></i>
      <span ng-if="item.category">{{::item.category.name}}</span>
      <span ng-if="!item.category">{{::'REGISTRY.TYPE.ENUM.'+item.type|uppercase|translate}}</span>
    </h4>
    <i class="icon ion-ios-arrow-right "></i>
  </div>
</ion-list>
